package com.cx.controller;

import com.cx.pojo.Collect;
import com.cx.service.CollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("collect")
public class CollectController {

    @Autowired
    CollectService collectService;

    @RequestMapping("selectByUserId")
    @ResponseBody
    public List<Collect> selectByUserId(Integer userId){
        List<Collect> collectList = collectService.selectByUserId(userId);
        return collectList;
    }
}
